package com.igeek.ch02.vo;

import java.util.List;

/**
 * @author chenmin
 * 2023/7/27 10:36
 * @description 分页数据VO
 */
public class PageVO<T> {

    //当前页码
    private int current;
    //搜索条件
    private String query;
    //列表
    private List<T> list;
    //总记录数
    private int myCounts;
    //总页数
    private int myPages;

    public PageVO() {
    }

    public PageVO(int current, String query, List<T> list, int myCounts, int myPages) {
        this.current = current;
        this.query = query;
        this.list = list;
        this.myCounts = myCounts;
        this.myPages = myPages;
    }

    /**
     * 获取
     * @return current
     */
    public int getCurrent() {
        return current;
    }

    /**
     * 设置
     * @param current
     */
    public void setCurrent(int current) {
        this.current = current;
    }

    /**
     * 获取
     * @return query
     */
    public String getQuery() {
        return query;
    }

    /**
     * 设置
     * @param query
     */
    public void setQuery(String query) {
        this.query = query;
    }

    /**
     * 获取
     * @return list
     */
    public List<T> getList() {
        return list;
    }

    /**
     * 设置
     * @param list
     */
    public void setList(List<T> list) {
        this.list = list;
    }

    /**
     * 获取
     * @return myCounts
     */
    public int getMyCounts() {
        return myCounts;
    }

    /**
     * 设置
     * @param myCounts
     */
    public void setMyCounts(int myCounts) {
        this.myCounts = myCounts;
    }

    /**
     * 获取
     * @return myPages
     */
    public int getMyPages() {
        return myPages;
    }

    /**
     * 设置
     * @param myPages
     */
    public void setMyPages(int myPages) {
        this.myPages = myPages;
    }

    public String toString() {
        return "PageVO{current = " + current + ", query = " + query + ", list = " + list + ", myCounts = " + myCounts + ", myPages = " + myPages + "}";
    }
}
